/**
  * @Author: songgh
  * @Date: 2021-09-20 14:41:08
  * @LastEditors: songgh
  * @LastEditTime: 2021-09-20 15:41:08
  * @Description: user
  */
import {
    SET_USER_INFO
} from '../types'

const user = {
    namespaced: true,
    state: {
        userInfo: {},
    },
    mutations: {
        [SET_USER_INFO](state, data):void {
            state.userInfo = data;
        }
    },
    actions: {
        setUserInfo: ({
            commit
        }, data):void => commit(SET_USER_INFO, data)
    },
    getters: {
        getUserInfo: (state):number => state.userInfo
    }
};

export default user;